import tensorflow as tf

#创建两个矩阵
mat1 = tf.constant([[1,2,3],[4,5,6],[7,8,9]])
mat2 = tf.constant([[1],[2],[3]])

a = tf.matmul(mat1,mat2)

#使用Session的两种方法
#One
sess = tf.Session()
result = sess.run(a)
print(result)
sess.close()

#two
with tf.Session() as sess:
    result2 = sess.run(a)
    print(result2)